<!--
 * @Description: ...
 * @Author: yangli 121029539@qq.com
 * @Date: 2025-02-06 11:23:56
 * @LastEditTime: 2025-02-13 15:07:06
 * @LastEditors: yangli 121029539@qq.com
 * @FilePath: \uniapp\src\pagesrepair\succ.vue
-->
<template>
    <view class="bg-white min-h-screen flex flex-col justify-center items-center">
        <view class="text-center  pt-[60rpx] pb-[32rpx]">
            <image src="/static/images/repair/pic_success.png" class="w-[290rpx] h-[290rpx] " mode="widthFix"></image>
        </view>
        <view class="text-[36rpx] font-extrabold text-main pb-[20rpx]">报修成功</view>
        <view class="text-base  text-info ">报修申请已提交成功，</view>
        <view class="text-base  text-info mb-[60rpx]">请投递快递后填写快递单号</view>
        <view class=" pb-[32rpx]">
            <u-button @tap="toApply" type="primary"
                :custom-style="{ width: '654rpx', height: '88rpx', borderRadius: '6rpx' }">填写快递单号</u-button>
        </view>
        <view class="">
            <u-button @tap="goHome" plain type="primary"
                :custom-style="{ width: '654rpx', height: '88rpx', borderRadius: '6rpx' }">返回首页</u-button>
        </view>

    </view>
</template>

<script setup lang="ts">
import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app";
import { computed, reactive, ref, shallowRef } from 'vue'
import { useAppStore } from '@/stores/app'
import { useUserStore } from '@/stores/user'

const appStore = useAppStore()
const userStore = useUserStore()
const token = computed(() => userStore.token)


const state = reactive({
    repairId: ''
})

function goHome() {
    uni.switchTab({
        url: '/pages/index/index'
    })
}

const toApply = async () => {
    uni.redirectTo({
        url: `/pagesrepair/expressnum?repairId=${state.repairId}`
    })
}

onLoad((options: any) => {
    console.log('options.pageData', options)
    state.repairId = options?.repairId || 0;
})
</script>

<style lang="scss" scoped></style>
